package arrays;

import java.util.Arrays;

public class Array {
    public static void main(String[] args) {
        int[] array = {1, 2, 3, 4, 5};
        System.out.println("原数组："+ Arrays.toString(array));
        transform(array);
        System.out.println("转换后的数组："+ Arrays.toString(array));


    }

    public static void transform(int[] array) {
        for (int i = 0; i < array.length; i++) {
            array[i] = array[i] * 2;
        }
    }
}
